#include <sys/types.h>
#include <signal.h>
#include <iostream>
#include <cerrno>
#include <cstring>
using namespace std;

void usage(string proc)
{
    cout << "usage: "<<endl;
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        usage(argv[0]);
        exit(1);
    }
    int signo = atoi(argv[1]);
    int tar_id = atoi(argv[2]);
    int n = kill(tar_id, signo);
    if (n != 0)
    {
        cerr << errno << ", errstring: " << strerror(errno) << endl;
        return 1;
    }
    return 0;
}
